home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
edit
/
mg2a_src.zip
/
SYS
/
VMS
/
AAAREADM.1ST
next >
Wrap
Text File
|
1988-08-23
|
6KB
|
151 lines
This directory ([.SYS.VMS]) contains the VMS-specific files for MG.
+-----------------------+
| Construction |
+-----------------------+
By this point you should have put the ``system-independent'' files
into a directory of your choice, then put the VMS files into the
subdirectory [.SYS.VMS]. You should also put the termcap terminal
driver into the subdirectory [.SYS.DEFAULT], and the termcap library
files into [.SYS.TERMLIB]. These come with the standard MG distribution,
so you shouldn't have much trouble.
The command file MAKE.COM is designed to compile and link the entire
program, using the VMS system functions and the termcap terminal
driver.
To invoke MAKE.COM, enter
SET DEF dev:[emacs-dir] ! location of system-independent files
@[.SYS.VMS]MAKE ! go have some coffee...
This will create the termcap library, compile each of the necessary
modules, and link the entire program into dev:[emacs-dir]MG.EXE.
NOTE: To keep the size of the executable program down, MAKE.COM
attempts to link in the VAX C shareable run-time library. Since VMS
4.4 and up have the VAX C run-time library bundled into it, there
shouldn't be any problem finding it. If there is, modify MG.OPT to
link with SYS$LIBRARY:VAXCRTL.OBJ/LIB instead.
+-------------------------------------------------------+
| Specifying Your Terminal With Termcap |
+-------------------------------------------------------+
(CAVEAT AND CREDITS: The termcap subroutine library in
[.SYS.TERMLIB] was written by Fred Fish (of Amiga Public Domain
Library fame) and placed in the public domain. It is not guaranteed to
be a complete implementation of the Unix termcap(5) library; the usual
disclaimers (like "it works for me":-) apply here. I have modified it
to support the tc= capability, which lets you define terminals in
terms (pardon the pun) of other terminals, so it should work
reasonably well with the termcap provided in [.SYS.TERMLIB]TERMCAP.)
To use the termcap library, you need to tell it where to find a
terminal definition (termcap) file. If you have GNU Emacs installed,
MG will use its termcap file from EMACS_LIBRARY:[ETC]TERMCAP.DAT.
Otherwise, it will try to find the file which on Unix systems is
called /etc/termcap. To emulate the same behavior on VMS, DEFINE/JOB
the logical name ETC to point to a directory that contains a termcap
file, with the name TERMCAP. (no extension). (The /JOB qualifier is
needed when you run MG as a spawned supprocess.)
DEFINE/JOB ETC dev:[dir]
If your system has Eunice, there is a large termcap file already
available via this exact mechanism, so you shouldn't need to define
ETC at all. If you don't have Eunice, never fear; a termcap resides
in the file [.SYS.TERMLIB]TERMCAP., so all you have to do is
DEFINE ETC [emacs-directory.SYS.TERMLIB]
to get started. You get the idea. Lastly, if your site uses the
logical name ETC for another purpose, you can define the logical name
TERMCAP to point to the MG termcap file. You must specify the path in
Unix format, with the root being the disk drive the file resides on.
For example, if the termcap file is in DUA0:[USER]TERMCAP., the
command would be
DEFINE TERMCAP "/dua0/user/termcap"
The VAX C run-time library can translate this into the appropriate VMS
file specification for you (a rather nice feature...).
Once you've indicated where the termcap file is, you can tell MG what
kind of terminal you're using by defining the logical name EMACS_TERM.
DEFINE/JOB EMACS_TERM "termtype"
where "termtype" is in lower case and matches an entry in the termcap
file. (Alternatively, you can define the logical name TERM and MG will
look there if EMACS_TERM is not defined. Again, GNU Emacs uses EMACS_TERM
and Eunice uses TERM.)
NOTE: One performance aspect of termcap files is that they are
searched sequentially, so you may want to move the most frequently
used terminals at your site to the beginning of the file to minimize
startup overhead.
+---------------------------------------+
+ TERMINAL INITIALIZATION FILE |
+---------------------------------------+
The termcap terminal driver allows you to initialize MG differently,
depending on what kind of terminal you're using. See
[.SYS.DEFAULT]README for more information.
+---------------------------------------+
| INVOKING MG |
+---------------------------------------+
First of all, remember to set up the logical names for the terminal
type and termcap file. This can be done just once, in your LOGIN.COM file.
Then, to just run MG in your current process,
$ RUN [emacs-directory]MG
Or you can define a symbol to run it with command line arguments:
$ MG :== $dev:[emacs-directory]MG
$ MG [file]
+---------------------------------------+
| MG As a Kept Fork |
+---------------------------------------+
You can use [.SYS.VMS]MG.COM to spawn a MicroEmacs subjob, which you
can then attach to and pop out of as you please. Edit the line at the
top of MG.COM that defines the path to the image MG.EXE, then define a
global symbol called MG:
$ MG :== @dev:[emacs-directory.SYS.VMS]MG
You can then use MG to edit files:
$ MG [file]
When inside MG, use the command M-x suspend-emacs (bound to C-z by
default) to suspend the MG process and attach your terminal to the
process that spawned it. To re-attach to MG, just issue the MG command
again:
$ MG [file]
The command file will reattach you to your MG process, where you can
continue editing where you left off. If you specify a new file to
edit, the command file sets a logical name which MG then looks at when
you reattach.
+-------------------------------+
| MG As a Mail Editor |
+-------------------------------+
As an added bonus, the file MGMAILEDIT.COM makes MG your mail editor
when you use the SEND/EDIT command. Issue the command
DEFINE/JOB MAIL$EDIT dev:[dir]MGMAILEDIT.COM
to inform the mail system you want to use MGMAILEDIT.COM, then whenever
you issue SEND/EDIT inside mail, MG will be used as your mail editor.